import machine
import utime

RST = machine.Pin("GP0",machine.Pin.IN)

while True:
    res = RST.value()
    print(res)
    if res == 1:
        break
    utime.sleep(1)

RST.off()
print("finished")